#!/bin/bash

#Control Center for BigLinux
#
#Authors:
#  Bruno Goncalves Araujo <www.biglinux.com.br>
#
#License: GPLv2 or later
#################################################

#Transforma fontes e cores do KDE em CSS

echo "<style><!--

a:link {color:$(grep "^Palette.active=" ~/.config/Trolltech.conf | cut -f15 -d ",");text-decoration:none;}
a:hover {text-decoration:underline;}
body {
	background-color: $(grep "^Palette.active=" ~/.config/Trolltech.conf | cut -f11 -d ",");
	color: $(grep "^Palette.active=" ~/.config/Trolltech.conf | cut -f7 -d ",");
	font-size: $(($(grep "^font=" ~/.kde/share/config/kdeglobals | cut -f2 -d ",") + 4));
	font-family: '$(grep "^font=" ~/.kde/share/config/kdeglobals | cut -f1 -d "," | sed s'/font=//'g)';"

if [ "$(grep "^font=" ~/.kde/share/config/kdeglobals | cut -f5 -d ",")" = "75" ]
then
  echo "	font-weight: bold;"
else
  echo "	font-weight: normal;"
fi

if [ "$(grep "^font=" ~/.kde/share/config/kdeglobals | cut -f6 -d ",")" = "2" ]
then
  echo "	font-style: italic;"
else
  echo "	font-style: none;"
fi


echo "}
table {font-size: $(($(grep "^font=" ~/.kde/share/config/kdeglobals | cut -f2 -d ",") + 4));}
table.kdecolor {
background-color: $(grep "^Palette.active=" ~/.config/Trolltech.conf | cut -f10 -d ",");
}
--></style>
"
